package components;

import java.rmi.RemoteException;

import javax.swing.JOptionPane;
import javax.swing.JPanel;

import main.Main;

public abstract class MyPanel extends JPanel{   

	public MyPanel(){
		setLayout(null);
		initComponent();
		String s=null;
		try {
			s = Main.getLogic().getMessage();
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		if(!s.equals("")){
			JOptionPane.showMessageDialog(null,s);
			try {
				Main.getLogic().setMessage("");
			} catch (RemoteException e) {
				e.printStackTrace();
			}
		}
	}

	protected abstract void initComponent();
	
	protected abstract void updateVO();

}
